package com.xysl.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 角色对象 zl_role
 *
 * @author xysl
 * @date 2025-01-10
 */
@Schema(description = "学幼数联app角色对象")
@Data
public class XyslRole
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Schema(description = "角色名称")
    private String roleName;

    @Schema(description = "权限字符")
    private String roleCode;

    @Schema(description = "角色描述")
    private String roleDesc;

    @Schema(description = "角色状态；0-正常;1-关闭")
    private String status;

    @Schema(description = "父节点id")
    private Long parentId;

    private Long[] menuIds;

    @Schema(description = "角色是否上下级关联")
    private boolean menuCheckStrictly = true;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    @Schema(description = "子角色")
    private List<XyslRole> children = new ArrayList<XyslRole>();

}
